<h3>
    <?php //echo 'Giỏ hàng'; ?>
</h3>
<ul>
    <?php
    if (!isset($carts))
        $carts = Cart::getCartsofOwner();

    if (isset($carts)) {
        foreach ($carts as $cart) {
            printf('<li> <b>%s</b> <b>%s</b> | (%s)</li>',
                    $cart->amount,
                    CHtml::link($cart->product->name,
                            array('product/view', 'id' => $cart->product->id)
                    ),
                    CHtml::link('Xóa',
                            array('Cart/delete', 'id' => $cart->id)
                    )
            );
        }
    ?>
    </ul>
    <hr />
<?php
        echo CHtml::link('Mua hàng', array('order/create'));
    } else
        echo 'Giỏ hàng rỗng.';
?>
